package app.vendorportal.api.marketplace;

import app.vendorportal.api.marketplace.data.request.QueryProductBySkuRequest;
import app.vendorportal.api.marketplace.data.request.QueryProductRequest;
import app.vendorportal.api.marketplace.data.request.QueryProductStatusBySkuRequest;
import app.vendorportal.api.marketplace.data.request.QueryProductStatusRequest;
import app.vendorportal.api.marketplace.data.response.QueryProductBySkuResponse;
import app.vendorportal.api.marketplace.data.response.QueryProductResponse;
import app.vendorportal.api.marketplace.data.response.QueryProductStatusBySkuResponse;
import app.vendorportal.api.marketplace.data.response.QueryProductStatusResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

/**
 * @author vince
 */
public interface ProductQueryAPIService {

    @RequestMapping(value = "/market/product/query", method = RequestMethod.POST)
    @ResponseBody
    QueryProductResponse queryProduct(QueryProductRequest request);

    @RequestMapping(value = "/market/product/query-by-sku", method = RequestMethod.POST)
    @ResponseBody
    QueryProductBySkuResponse queryProductBySkuCodes(QueryProductBySkuRequest request);

    @RequestMapping(value = "/market/product/status")
    @ResponseBody
    QueryProductStatusResponse queryProductStatus(@Valid @RequestBody QueryProductStatusRequest request);


    @RequestMapping(value = "/market/product/status/query-by-sku")
    @ResponseBody
    QueryProductStatusBySkuResponse queryProductStatusBySkuCodes(@Valid @RequestBody QueryProductStatusBySkuRequest request);

}
